package com.p2p.front.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.p2p.base.page.PageVo;
import com.p2p.front.dal.dao.ProtectQuestionDao;
import com.p2p.front.dal.model.PwdProtectQuestion;
import com.p2p.front.service.ProtectQuestionService;

@Service("protectQuestionService")
public class ProtectQuestionServiceImpl implements ProtectQuestionService{
	@Resource
	private ProtectQuestionDao protectQuestionDao;
	@Override
	public PwdProtectQuestion findById(Long id) {
		return protectQuestionDao.findById(id);
	}
	@Override
	public void update(PwdProtectQuestion protectQuestion) {
		protectQuestionDao.update(protectQuestion);
	}
	@Override
	public void save(PwdProtectQuestion protectQuestion) {
		protectQuestionDao.save(protectQuestion);
	}
	@Override
	public PwdProtectQuestion findByUserId(String id) {
		return protectQuestionDao.findByUserId(id);
	}
	@Override
	public PageVo listPage(PageVo form) {
		List<Map<String,Object>> list=protectQuestionDao.list(form);
		form.setList(list);
		return form;
	}
	
	@Override
	public void remove(Integer id) {
		protectQuestionDao.remove(id);
	}

}
